﻿using Camc.Quality.QualityAnalysis.RFormBase;
using Camc.Quality.QualityAnalysis.RFormClass;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Camc.Quality.QualityAnalysis.RFormEntity
{
    public class R仪器安装分离力测试多媒体记录表 : RTableBase
    {
        public R仪器安装分离力测试多媒体记录表(int serialNum, Guid rWorkStepEntityId, Guid rProcessesEntityId, int sort, string fisrtDrawingNum, string firstDrawingName, string productNum, string paramCode,string recordRemark)
        {
            SerialNum = serialNum;
            RWorkStepEntityId = rWorkStepEntityId;
            RProcessesEntityId = rProcessesEntityId;
            Sort = sort;
            FisrtDrawingNum = fisrtDrawingNum;
            FirstDrawingName = firstDrawingName;
            ProductNum = productNum;
            ParamCode = paramCode;
            RecordRemark = recordRemark;
        }
        public override string FormName { get; protected set; } = "仪器安装分离力测试多媒体记录表";

        #region A4
        public override string FisrtDrawingNum_DisplayName { get; protected set; } = "产品型号/代号";
  
        #endregion
        #region A5
        public override string FirstDrawingName_DisplayName { get; protected set; } = "名称";
 
        #endregion
        #region A8
        public override string ProductNum_DisplayName { get; protected set; } = "产品编号";

        #endregion
        #region A17
        public override string ParamCode_DisplayName { get; protected set; } = "参数代号";

        #endregion
        public RMeasuredResultEntity SetMeasuredResult(RMeasuredResultEntity entity, string measuredValues)
        {
            entity.SetFirstMeasuredValues(measuredValues, "实测值");
            return entity;
        }
        public RMultiMediaEntity SetMultiMedia(RMultiMediaEntity entity, string photoNo)
        {
            entity.SetMultiMedia(photoNo, "多媒体");

            return entity;
        }
        /// <summary>
        /// 三检
        /// </summary>
        public RInspectionSignatureEntity SetInspectionSignature(RInspectionSignatureEntity entity, string firstOperator, DateTime? firstOperatorTime, string secondOperator, DateTime? secondOperatorTime, string thirdOperator, DateTime? thirdOperatorTime)
        {
            entity.InspectionSignatureName = "三检";
            entity.SetFirstOperator(firstOperator, "记录者", firstOperatorTime, "记录者操作时间");
            entity.SetSecondOperator(secondOperator, "确认者", secondOperatorTime, "确认者操作时间");
            entity.SetThirdOperator(thirdOperator, "检验员", thirdOperatorTime, "检验员操作时间");
            return entity;
        }
    }
}
